﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<%
myid=qingtian.nid
qmyid=qingtian.admintk("tid")
if myid=qmyid and request("act")=1 then
ttid=request("id")
if ttid="" then ttid=1
ttid=clng(ttid)
sql="delete from l Where id=" & ttid & ""
  liao.Execute(sql)
end if
page=request("page")
if page="" then page="1"

pag=10%>
<card title="江湖消息" ontimer="qliao.asp?mm=<%=time%>&amp;cc=<%=cc%>&amp;ve=<%=ve%>&amp;page=<%=page%>">
<timer value="300"/>
<p>
<% 
dim rs,rsstr
set rs=Server.CreateObject("ADODB.Recordset")
rsstr="select id,lid,name,txt,tm from l order by tm desc"
rs.open rsstr,liao,1,2

if rs.eof then 
response.write("暂无消息！<br/>")
else
%>
<a href='add.asp?cc=<%=cc%>&amp;ve=<%=ve%>'>发言</a>|<a href='qliao.asp?cc=<%=cc%>&amp;ve=<%=ve%>&amp;ttp=<%=time%>'>刷新</a><br/>
<%
response.write("----及时信息------<br/>")
dim page,maxpage
page=cint(request.QueryString("page"))
if page="" or page<1 then page=1
maxpage=int((rs.recordcount-1)/pag)+1
if page>maxpage then page=maxpage

rs.Move((page-1)*pag)
dim j
j=1
do while ((not rs.EOF) and j <=cint(pag))
%>

<%=((page-1)*pag+j)%>.<a href='/userview.asp?cc=<%=cc%>&amp;ve=<%=ve%>&amp;id=<%=rs("lid")%>'><%=rs("name")%></a>:<%=qingtian.utf8(rs("txt"))%>
<%if myid=qmyid then%>
<a href='qliao.asp?act=1&amp;cc=<%=cc%>&amp;ve=<%=ve%>&amp;page=<%=page%>&amp;id=<%=rs("id")%>'>删除</a>
<%end if%>
<br/>
[<%=rs("tm")%>]
<br/>

<%
    rs.Movenext  
j=j+1
loop
end if

if page*pag<rs.recordcount then response.write("<a href='qliao.asp?cc="&cc&"&amp;ve="&ve&"&amp;page=" & page+1 & "'>下一页</a>")
if page>1 then response.write("<a href='qliao.asp?cc="&cc&"&amp;ve="&ve&"&amp;page=" & page-1 & "'>上一页</a>")

if page*pag<rs.recordcount or page>1 then response.write("<br/>")
if page*pag<rs.recordcount then response.write("----------<br/>("& page & "/" & (int(rs.recordcount/pag+1)) &"/" & rs.recordcount & ")<br/>")
%>

<%if page*pag<rs.recordcount or page>1 then%>
跳到第<input name="gpage<%=minute(now)%><%=second(now)%>" title="页码" type="text" format="*N" emptyok="true" size="3" value="<%response.write(page+1)%>" maxlength="3"/>页
<a href="qliao.asp?cc=<%=cc%>&amp;ve=<%=ve%>&amp;page=$(gpage<%=minute(now)%><%=second(now)%>)">[GO]</a><br/>
<%end if%>
<%
rs.close
set rs=nothing
%>
----------<br/>
<a href='index.asp?cc=<%=cc%>&amp;ve=<%=ve%>'>江湖首页</a><br/>
<%qingtian.shuchu%>